package com.xdtech.sys.service;

import java.util.List;

import com.xdtech.common.service.IBaseService;
import com.xdtech.sys.model.MenuFunction;
import com.xdtech.sys.vo.MenuItem;
import com.xdtech.web.freemark.item.MenuButtonItem;
import com.xdtech.web.model.Menu;
import com.xdtech.web.model.ResultMessage;

public interface MenuFunctionService extends IBaseService<MenuFunction> {
	List<MenuFunction> loadMenuFunctionsByRoles(List<Long> roleIds);
	
	public List<MenuFunction> loadAllTreeFunctions();
	
	public List<MenuFunction> loadAllFunctions();
	
	public List<Menu> loadAllMenus();
	
	public List<MenuButtonItem> loadAllMenuButtonItems();
	
	public List<MenuFunction> loadAllMenus(boolean needRoot);
	
	public MenuItem loadItem(MenuItem item);
	
	public ResultMessage saveMenuItem(MenuItem item);
	
	public List<MenuFunction> loadByRoleId(Long roleId);

	/**
	 * 
	 * @author max.zheng
	 * @create 2014-12-23下午10:26:37
	 * @modified by
	 * @param menuId
	 * @return
	 */
	boolean deleteMenuInfo(Long menuId);

	/**
	 * 加载菜单和按钮，如果
	 * @author <a href="max.zheng@zkteco.com">郑志雄</>
	 * @since 2015-2-3 下午2:07:36
	 * @param roleId
	 * @return
	 */
	List<MenuItem> loadMenusAndOperationWithRoleId(Long roleId);

	/**
	 * 
	 * @author max.zheng
	 * @create 2015-2-3下午9:20:01
	 * @modified by
	 * @param b
	 * @return
	 */
	List<MenuFunction> loadAllMenusAndOperations(boolean b);

}
